<style>
    * {
        font-family: 微软雅黑;
    }

    .head_bg img {
        margin: 0 auto;
        display: block;
        width: 100%;
        height: auto;
        background-size: 100% 100%;
    }

    .head_title {
        text-align: center;
        font-size: 18px;
        margin-top: 20px;
        color: #000000;

    }

    .head_intro {
        text-align: center;
        margin-top: 10px;
    }

    .time {
        color: #d8b37e;
        margin-left: 10px;
        /*font-size: 18px;*/
        margin-top: 3px;
    }

    .intro {
        margin-top: 20px;
        text-indent: 25px;
        line-height: 30px;
    }

</style>

<div class="col-sm-12">
    <div class="row exHall" style="width: 100%;height: 30px; line-height: 30px;font-size: 16px;">
        <span>展位信息</span>
        <button type="button" class="btn btn-info btn-sm pull-right" onclick="black()">返回</button>
    </div>
    <div class="row" style="margin-top: 20px;">
        <div class=" col-md-3" th:object="${literature}">
            <div class="panel panel-default">
                <div class="panel-body">
                    <img style="height:200px;width:100%;background-size: 100% 100%"
                         th:src="${showUrl} + *{literatureImg}" class="img-responsive" alt="">
                </div>
            </div>
        </div>
        <div class="col-md-6" th:object="${literature}">
            <!--<div class="row">-->
            <!--<div class="col-md-12">-->
            <!--<h5 th:text="*{literatureTitle}" style="font-size: 16px"></h5>-->
            <!--</div>-->
            <!--<div class="col-md-12">-->
            <!--<h5 th:text="*{literatureContent}"  style="font-size: 14px"></h5>-->
            <!--</div>-->
            <!--<div class="col-md-12">-->
            <!--<audio controls="controls" height="100" width="100%">-->
            <!--<source th:src="${showUrl} + *{literatureFile}"   type="audio/mp3" />-->

            <!--</audio>-->
            <!--</div>-->
            <!--</div>-->


            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="alert alert-success" style="position: relative">
                        <span class="alert-link" style="font-size: 18px;text-decoration: none"
                              th:text="*{literatureTitle}"></span>
                        <sub style="margin-left: 3px;font-size: 75%;line-height: 16px;position: absolute;top: -9px;bottom: 15px;left: 15px; background: #dff0d8;; height: 16px;width: 100px;text-align: center;border-top:1px solid #d6e9c6"><i>展位标题</i></sub>
                    </div>

                    <div class="alert alert-info" style="position:relative;">
                        <span class="alert-link" style="font-size: 16px;text-decoration: none"
                              th:text="*{literatureContent}"></span>
                        <sub style="margin-left: 3px;font-size: 75%;line-height: 16px;position: absolute;top: -9px;bottom: 15px;left: 15px; background: #d9edf7; height: 16px;width: 100px;text-align: center;border-top:1px solid #bce8f1"><i>展位内容</i></sub>
                    </div>
                    <div class="alert alert-warning" style="position: relative">
                        <audio controls="controls" height="100" style="width: 400px" controlsList="nodownload">
                            <source th:src="${showUrl} + *{literatureFile}" type="audio/mp3"/>
                        </audio>
                        <sub style="margin-left: 3px;font-size: 75%;line-height: 16px;position: absolute;top: -9px;bottom: 15px;left: 15px; background: #fcf8e3; height: 16px;width: 100px;text-align: center;border-top:1px solid #faebcc"><i>信息音频</i></sub>
                    </div>
                </div>
            </div><!-- panel -->
        </div>
    </div>
    <div class="row exHall" style="width: 100%;height: 30px; line-height: 30px;font-size: 16px;margin-top: 20px;">
        展位文章信息
    </div>
    <div class="row filemanager" style="margin-top: 20px;    height: 373px; overflow: auto">

        <div class="col-xs-6 col-sm-4 col-md-3" th:each="literatureChildList:${literatureChildList}">
            <div class="thmb">
                <div class="thmb-prev">
                    <img src="../../images/photos/profile-1.png"
                         style="height:300px;width:100%;background-size: 100% 100%"
                         th:src="${showUrl} + ${literatureChildList.literatureChildImg}"
                         th:id="${literatureChildList.literatureChildId}" onclick="edit(this)" class="img-responsive"
                         alt="">
                </div>
                <h5 class="fm-title flot-left" th:text="${literatureChildList.literatureChildTitle}">tu1</h5>
            </div>
        </div>

        <div class="col-xs-6 col-sm-4 col-md-3 document">
            <div class="thmb">
                <div class="thmb-prev">
                    <img src="images/photos/media-doc.png"
                         style="height:300px;width:100%;background-size: 100% 100%" class="img-responsive" alt=""
                         data-toggle="modal" data-target=".bs-example-modal-static">
                </div>
                <h5 class="fm-title">增加平面展示图</h5>
            </div>
        </div>
    </div>
</div>

<div class="modal fade bs-example-modal-static" id="save" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">新增子信息</h4>
            </div>
            <div class="modal-body">
                <form enctype="multipart/form-data" method="post" id="saveIchnographyForm">
                    <div class="form-group">
                        <div class="col-lg-12">
                            <input type="file" id="imgFile" name="imgFile"/>
                            <input type="hidden" id="literatureImg" name="literatureChildImg"/>
                        </div>
                    </div>
                    <div class="form-group" id="btn-su">
                        <div class="col-lg-12">
                            <input type="file" id="papersFile" name="papersFile"/>
                            <input type="hidden" id="literatureFile" name="literatureChildFile"/>
                        </div>

                    </div>
                    <input type="hidden" id="literatureId" name="literatureId" th:value="${literatureId}"/>
                    <div class="form-group" style="margin-top: 20px" >
                        <div class="col-lg-12">
                            <input type="text" class="form-control" id="literatureChildTitle"
                                   name="literatureChildTitle" placeholder="文章标题" required>
                        </div>
                    </div>
                    <div class="form-group" style="margin-top: 20px" >
                        <div class="col-lg-12">
                            <input type="text" class="form-control" id="literatureChildContent"
                                   name="literatureChildContent" placeholder="文章内容" required>
                        </div>
                    </div>

                    <!--<input type="text" class="form-control" style="margin-top: 20px" name="literatureType" >-->
                    <div class="form-group" style="margin-top: 20px">
                        <div class="col-lg-12">
                            <select name="literatureChildType" id="select" class="form-control" placeholder="文章类型"
                                    style="width: 100%;height: 100%;">
                                <option value="">--请选择--</option>
                                <option value="1">有音频</option>
                                <option value="2">无音频</option>
                            </select>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary"  id="validateBtn" >增加平面图
                    <!--onclick="saveIchnography()"-->
                </button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<div class="modal fade" id="edit"  tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="max-height:800px;overflow-y:auto;overflow-x:hidden;background-color: #fff">
            <form enctype="multipart/form-data" method="post" id="saveIchnographyForm1">
                <div class="modal-header">
                    <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
                    <h4 class="modal-title">修改子信息</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <div class="col-lg-12">
                            <img id="imagesFire" src="" alt="图片" style="width: 100%;height: 100%;">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-12">
                            <input type="file" id="imgFile1" name="imgFile"/>
                            <input type="hidden" id="literatureImg1" name="literatureChildImg"/>
                        </div>
                    </div>
                    <div class="form-group" id="papersFile2">
                        <div class="col-lg-12">
                            <input type="file" id="papersFile1" name="papersFile"/>
                            <input type="hidden" id="literatureFile1" name="literatureChildTime"/>
                        </div>

                    </div>
                    <input type="hidden" id="exhibtionId1" name="exhibtionId" th:value="${exhibtionId}"/>
                    <div class="form-group" style="margin-top: 20px" >
                        <div class="col-lg-12">
                            <input type="text" class="form-control" id="literatureTitle"
                                   name="literatureChildTitle" placeholder="文章标题" required>
                        </div>
                    </div>
                    <div class="form-group"  style="margin-top: 20px">
                        <div class="col-lg-12">
                            <input type="text" class="form-control"  id="literatureContent"
                                   name="literatureChildContent" placeholder="文章内容" required>
                        </div>
                    </div>

                    <!--<input type="text" class="form-control" style="margin-top: 20px" id="literatureType" name="literatureType" placeholder="文章类型">-->
                    <div class="form-group" style="margin-top: 20px">
                        <div class="col-lg-12">
                            <select name="literatureChildType" id="literatureChildType" class="form-control"
                                    placeholder="文章类型" style="width: 100%;height: 100%;">
                                <option value="">--请选择--</option>
                                <option value="1">有音频</option>
                                <option value="2">无音频</option>
                            </select>
                        </div>

                    </div>
                    <div class="form-group">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="panel panel-default">
                                    <div class="panel-body">
                                        <hr/>
                                        <div class=""><img src="../static/images/time1.png"
                                                           th:src="@{/images/time1.png}" width="23px"
                                                           height="23px"><span class="time">2018-08-16</span></div>
                                        <div class="" style="margin-top: 10px"><img src="../static/images/map1.png"
                                                                                    th:src="@{/images/map1.png}"
                                                                                    width="23px" height="23px"><span
                                                class="time">东华门，东南角落</span></div>
                                        <div class="intro">
                                        </div>
                                        <div class="slide"><img style="display: block;margin: 0 auto" width="40px"
                                                                height="25px" src="../static/images/slide.png"
                                                                th:src="@{/images/slide.png}"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group" id="adut">
                        <!--<audio controls="controls" id="adut" height="100" style="width: 400px"-->
                               <!--controlsList="nodownload">-->

                        <!--</audio>-->
                        <!--<audio controls="controls" height="100" width="100%">-->
                        <!--<source src=""  id="audioSrc" type="audio/mp3" />-->

                        <!--</audio>-->
                        <!--<a href="" id="fileFire" class="a-box" download="" style="position: relative;z-index: 3;">音频下载</a>-->
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="literatureChildId" id="ichnographyId">  <!-- 用来修改的文章Id-->
                    <input type="hidden" name="literatureId" th:value="${literatureId}"/>    <!--文章相关的展厅Id-->
                    <button type="button" class="btn btn-primary" id="updateliteratureId"  >
                        修改
                    </button>
                    <button type="button" class="btn btn-danger" onclick="dele()">删除</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<script type="text/javascript" th:inline="javascript">
    $("#imgFile").fileinput({
        language: 'zh', //设置语言
        uploadUrl: "literature/getImgFileName", //上传的地址
        allowedFileExtensions: ['jpg', 'gif', 'png'],//接收的文件后缀
        //uploadExtraData:{"id": 1, "fileName":'123.mp3'},
        uploadAsync: true, //默认异步上传
        showUpload: true, //是否显示上传按钮
        showRemove: true, //显示移除按钮
        showPreview: true, //是否显示预览
        showCaption: false,//是否显示标题
        browseClass: "btn btn-primary", //按钮样式
        browseLabel: '图片上传',
        dropZoneEnabled: false,//是否显示拖拽区域
        minImageWidth: 600, //图片的最小宽度
        minImageHeight: 600,//图片的最小高度
        //maxImageWidth: 1000,//图片的最大宽度
        //maxImageHeight: 1000,//图片的最大高度
        //maxFileSize:0,//单位为kb，如果为0表示不限制文件大小
        //minFileCount: 0,
        maxFileCount: 10, //表示允许同时上传的最大文件个数
        enctype: 'multipart/form-data',
        validateInitialCount: true,
        previewFileIcon: "<iclass='glyphicon glyphicon-king'></i>",
        msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}！",
    }).on("fileuploaded", function (event, data, previewId, index) {
        $("#literatureImg").val(data.response);
    });
    $("#papersFile").fileinput({
        language: 'zh', //设置语言
        uploadUrl: "literature/getPapersFileName", //上传的地址
        allowedFileExtensions: ['mp3'],//接收的文件后缀
        //uploadExtraData:{"id": 1, "fileName":'123.mp3'},
        uploadAsync: true, //默认异步上传
        showUpload: true, //是否显示上传按钮
        showRemove: true, //显示移除按钮
        showPreview: true, //是否显示预览
        showCaption: false,//是否显示标题
        browseClass: "btn btn-primary", //按钮样式
        browseLabel: '音频上传',
        dropZoneEnabled: false,//是否显示拖拽区域
        minImageWidth: 600, //图片的最小宽度
        minImageHeight: 600,//图片的最小高度
        //maxImageWidth: 1000,//图片的最大宽度
        //maxImageHeight: 1000,//图片的最大高度
        //maxFileSize:0,//单位为kb，如果为0表示不限制文件大小
        //minFileCount: 0,
        maxFileCount: 10, //表示允许同时上传的最大文件个数
        enctype: 'multipart/form-data',
        validateInitialCount: true,
        previewFileIcon: "<iclass='glyphicon glyphicon-king'></i>",
        msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}！",
    }).on("fileuploaded", function (event, data, previewId, index) {
        $("#literatureFile").val(data.response);
    });
    //    编辑
    $("#imgFile1").fileinput({
        language: 'zh', //设置语言
        uploadUrl: "literature/getImgFileName", //上传的地址
        allowedFileExtensions: ['jpg', 'gif', 'png'],//接收的文件后缀
        //uploadExtraData:{"id": 1, "fileName":'123.mp3'},
        uploadAsync: true, //默认异步上传
        showUpload: true, //是否显示上传按钮
        showRemove: true, //显示移除按钮
        showPreview: true, //是否显示预览
        showCaption: false,//是否显示标题
        browseClass: "btn btn-primary", //按钮样式
        browseLabel: '图片上传',
        dropZoneEnabled: false,//是否显示拖拽区域
        minImageWidth: 600, //图片的最小宽度
        minImageHeight: 600,//图片的最小高度
        //maxImageWidth: 1000,//图片的最大宽度
        //maxImageHeight: 1000,//图片的最大高度
        //maxFileSize:0,//单位为kb，如果为0表示不限制文件大小
        //minFileCount: 0,
        maxFileCount: 10, //表示允许同时上传的最大文件个数
        enctype: 'multipart/form-data',
        validateInitialCount: true,
        previewFileIcon: "<iclass='glyphicon glyphicon-king'></i>",
        msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}！",
    }).on("fileuploaded", function (event, data, previewId, index) {
        $("#literatureImg1").val(data.response);
    });
    $("#papersFile1").fileinput({
        language: 'zh', //设置语言
        uploadUrl: "literature/getPapersFileName", //上传的地址
        allowedFileExtensions: ['mp3'],//接收的文件后缀
        //uploadExtraData:{"id": 1, "fileName":'123.mp3'},
        uploadAsync: true, //默认异步上传
        showUpload: true, //是否显示上传按钮
        showRemove: true, //显示移除按钮
        showPreview: true, //是否显示预览
        showCaption: false,//是否显示标题
        browseClass: "btn btn-primary", //按钮样式
        browseLabel: '音频上传',
        dropZoneEnabled: false,//是否显示拖拽区域
        minImageWidth: 600, //图片的最小宽度
        minImageHeight: 600,//图片的最小高度
        //maxImageWidth: 1000,//图片的最大宽度
        //maxImageHeight: 1000,//图片的最大高度
        //maxFileSize:0,//单位为kb，如果为0表示不限制文件大小
        //minFileCount: 0,
        maxFileCount: 10, //表示允许同时上传的最大文件个数
        enctype: 'multipart/form-data',
        validateInitialCount: true,
        previewFileIcon: "<iclass='glyphicon glyphicon-king'></i>",
        msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}！",
    }).on("fileuploaded", function (event, data, previewId, index) {
        $("#literatureFile1").val(data.response);
    });
</script>
<script type="text/javascript" th:inline="javascript">
    /*<![CDATA[*/

    var literatureId = [[${literatureId}]];
    var showUrl = [[${showUrl}]];
    var literatureChildList = [[${literatureChildList}]];
    var literature = [[${literature}]];

    var exhibtionId=[[${exhibtionId}]];

    var ichnographyId = [[${ichnographyId}]];
    $(function () {
        $('.modal-backdrop').remove();

    });



    var id = "";

    function edit(obj) {
        id = $(obj).attr("id");
        $("#ichnographyId").val(id);
        var showurl = [[${showUrl}]];
        $.post("literatureChild/findOneForLiteratureChild", {"literatureChildId": id}, function (data) {
            $("#literatureTitle").val(data.literatureChildTitle);
            $("#literatureContent").val(data.literatureChildContent);
            $("#literatureType").val(data.literatureChildType);
            $("#imagesFire").attr("src", showurl + data.literatureChildImg);
            $("#fileFire").attr("href", showurl + data.literatureChildFile);
            $("#footer-title").val(data.ichnographyName);
            $("#literatureImg1").val(data.literatureChildImg);
            $("#literatureFile1").val(data.literatureChildFile);
            $(".intro").text(data.literatureChildContent);
            $("#literatureChildType").val(data.literatureChildType);
            if (data.literatureChildFile != "") {
                myFunction(showurl + data.literatureChildFile)
            } else {
                $("#adut").empty()
            }
            if(data.literatureChildType=="2"){
                $("#papersFile2").css('display', "none");
                $("#adut").css('display', "none");
            }else if(data.literatureChildType=="1"){
                $("#papersFile2").css('display', "block");
                $("#adut").css('display', "block");
            }
        });


        $('#edit').modal('show');
    }

    function myFunction(y) {

        $("#adut").empty()
        var x = document.createElement("AUDIO");
        x.setAttribute("src", y);
        x.setAttribute("controlsList", "nodownload");
        x.setAttribute("controls", "controls");
        $("#adut").append(x);
    }

    function dele() {
//        var literatureChildId = $("#literatureId").val();
//        var floorId = $("#floorId").val();
        $.post("literatureChild/deleteLiteratureChild", {"literatureChildId": id}, function (data) {
            if (data > 0) {

                $.MsgBox.Alert("提示","删除成功")
                $("#soldier-modal").remove()
                $('#edit').modal('hide');
                $.goTo("literatureChild/literatureChildList", {
                    "literatureId": literatureId,
                    "exhibtionId": exhibtionId,
                    "ichnographyId": ichnographyId
                });
            } else {

                $.MsgBox.Alert("提示","删除失败")
            }
        })
        $('#edit').modal('hide');
    }

    function goToExhibition(obj) {
        var id = $(obj).attr("id");
    }


    $("#select").on("change", function () {
        if ($(this).val() == "2") {
            $("#btn-su").css('display', "none")
        } else if ($(this).val() == "1") {
            $("#btn-su").css('display', "block")
        }
    });
    $("#literatureChildType").on("change", function () {

        if ($(this).val() == "2") {
            $("#papersFile2").css('display', "none")
        } else if ($(this).val() == "1") {
            $("#papersFile2").css('display', "block")
        }
    });
    function black() {
        $.goTo(/*[[@{literature/literatureList}]]*/"./floor_show.html", {
            "exhibtionId": exhibtionId,
            "ichnographyId": ichnographyId
        });
    }
    $(function () {
        $(".slide").click(function () {
            $(".intro").slideToggle(function () {
//                $(this).css("height","500px")
            })
        })
    });
    $(function () {

        //建立一個可存取到該file的url
        function getObjectURL(file) {
            var url = null;
            if (window.createObjectURL != undefined) { // basic
                url = window.createObjectURL(file);
            } else if (window.URL != undefined) { // mozilla(firefox)
                url = window.URL.createObjectURL(file);
            } else if (window.webkitURL != undefined) { // webkit or chrome
                url = window.webkitURL.createObjectURL(file);
            }
            return url;
        }

        //获取点击的图片元素
        var cdimg = $('.fileImgs1').children('img');
        //获取上传图片的 input 标签元素
        var cdfile = $('.fileImgs1').children('input[type="file"]');
        //设置input 大小和图片一致
        cdfile.css({'width': cdimg.css('width'), 'height': cdimg.css('height')});
        //input透明度为0,定位，优先级比图片高
        cdfile.css({'opacity': 0, 'position': 'absolute', 'z-index': 10});
        //判断input的图片文件改变则img的图片也替换为input选择的图片
        cdfile.change(function () {
            if (this.files && this.files[0]) {
                var objUrl = getObjectURL(this.files[0]);
                if (objUrl) {
                    $(this).siblings('img').attr("src", objUrl);
                }
            }
        });
        //获取点击的图片元素
        var cdimg1 = $('.fileImgs1').children('img');
        //获取上传图片的 input 标签元素
        var cdfile1 = $('.fileImgs1').children('input[type="file"]');
        //设置input 大小和图片一致
        cdfile1.css({'width': cdimg1.css('width'), 'height': cdimg1.css('height')});
        //input透明度为0,定位，优先级比图片高
        cdfile1.css({'opacity': 0, 'position': 'absolute', 'z-index': 10});
        //判断input的图片文件改变则img的图片也替换为input选择的图片
        cdfile1.change(function () {
            if (this.files && this.files[0]) {
                var objUrl = getObjectURL(this.files[0]);
                if (objUrl) {
                    $(this).siblings('img').attr("src", objUrl);
                }
            }
        });
    })
    /*]]>*/
</script>

<!--验证-->
<script type="text/javascript" th:inline="javascript">
    /*<![CDATA[*/
    $(document).ready(function () {
        $('#saveIchnographyForm').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {  //startTimeToDate
                literatureChildTitle: {
                    validators: {
                        notEmpty: {
                            message: '请填写文章标题'
                        }
                    }
                },
                literatureChildContent: {
                    validators: {
                        notEmpty: {
                            message: '请填写文章内容'
                        }
                    }
                }
            }
        });
        $('#validateBtn').click(function () {
            $('#saveIchnographyForm').bootstrapValidator('validate');
            var flag = $('#saveIchnographyForm').data('bootstrapValidator').isValid();
            if (flag) {
                var literatureId = $("#literatureId").val();
                var saveIchnographyForm = $("#saveIchnographyForm").serialize();
                $.post("literatureChild/saveLiteratureChild", saveIchnographyForm, function (data) {
                        if (data > 0) {
                            $.MsgBox.Alert("提示","新增成功")
                            $.goTo("literatureChild/literatureChildList", {
                                "literatureId": literatureId,
                                "exhibtionId": exhibtionId,
                                "ichnographyId": ichnographyId
                            });
                        } else {
                            $.MsgBox.Alert("提示","新增失败")
                        }
                    });
            } else {
                return;
            }
        });
        $('#saveIchnographyForm1').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {  //startTimeToDate
                literatureChildTitle: {
                    validators: {
                        notEmpty: {
                            message: '请填写文章标题'
                        }
                    }
                },
                literatureChildContent: {
                    validators: {
                        notEmpty: {
                            message: '请填写文章内容'
                        }
                    }
                }
            }
        });
        $('#updateliteratureId').click(function () {
            $('#saveIchnographyForm1').bootstrapValidator('validate');
            var flag = $('#saveIchnographyForm1').data('bootstrapValidator').isValid();
            if (flag) {
                $("#ichnographyId").val(id);
                var saveIchnographyForm = $("#saveIchnographyForm1").serialize();
                $.post("literatureChild/updateLiteratureChild", saveIchnographyForm, function (data) {
                        if (data > 0) {
                            $.MsgBox.Alert("提示","修改成功")
                            $.goTo("literatureChild/literatureChildList", {
                                "literatureId": literatureId,
                                "exhibtionId": exhibtionId,
                                "ichnographyId": ichnographyId
                            });
                        } else {
                            $.MsgBox.Alert("提示","修改失败")
                        }
                    });
            } else {
                return;
            }
        });
    })


    /*]]>*/
</script>